package com.rentalcar.rental_car.exception;

import com.rentalcar.rental_car.entity.Result;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class ExceptionHandler {
    @org.springframework.web.bind.annotation.ExceptionHandler(Exception.class)
    public Result exceptionHandler(Exception ex){
        ex.printStackTrace();
         return Result.fail();
    }
}
